<?php date_default_timezone_set('Australia/Brisbane'); ?>

<div id="assessment_peer_review">

	<?php // print_r($group_members); ?>

		<table>
		
			<tr>
				<th>Student Name</th>
				<th>Assessment Item</th>
				<th>Grade</th>
				<th>Submit</th>
			</tr>

			<?php if ( is_array($group_members) ) : ?>
			<?php foreach ($group_members as $key => $member): ?>
			<?php if ($member['user_id'] != $user_id): ?>
				<tr>
					<form action="<?php site_url('assessment/peerreview'); ?>" method="post">
					<td>
						<?php echo $member['first_name'] . ' ' . $member['last_name']; ?>
						<input type="hidden" name="receiver_id" value="<?php echo $member['user_id']; ?>">
					</td>
					<td>
						<select name="assessment_id" id="assessment_id">
							<?php foreach($assessment_list as $key => $assesment ) : ?>
							<option value="<?php echo $assesment['assessment_id']; ?>"><?php echo $assesment['assessment_title']; ?></option>
							<?php endforeach; ?>
						</select>
					</td>
					<td>
						<input type="text" name="result" id="peer_review_result" style="width:60px;">
					</td>
					<td>
						<input type="submit" value="Submit Peer Review">
					</td>
					</form>
				</tr>
			<?php endif; ?>
			<?php endforeach ?>

			<?php else : ?>
			<p>You are not in a group!</p>
			<?php endif; ?>

		</table>
	
	
</div>
